home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / console / svgatext.3 / svgatext / SVGATextMode-1.3 / contrib / changefont / undump.c < prev   
Encoding:
C/C++ Source or Header  |  1995-09-19  |  349 b   |  29 lines

  1. #include <stdio.h>
  2.  
  3.  
  4. int getbyte(char *ootje)
  5. {
  6.   int i;
  7.   int mask=128;
  8.   int result;
  9.   
  10.   result=0;
  11.   for(i=0;i<8;i++)
  12.   {
  13.     if(ootje[i]!=' ') result|=mask;
  14.     mask/=2;
  15.   }
  16.   return result;
  17. }
  18.  
  19. void main()
  20. {
  21.   char instr[20];
  22.   
  23.   while(!feof(stdin))
  24.   {
  25.     fgets(instr,sizeof(instr),stdin);
  26.     if(!feof(stdin)) putchar(getbyte(instr));
  27.   }
  28. }
  29.